set(CMAKE_CXX_STANDARD 14)

find_package (Eigen3 REQUIRED NO_MODULE)
find_package(Sophus REQUIRED)

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

find_package(G2O REQUIRED)
include_directories(${G2O_INCLUDE_DIRS})

set(PNP_SRC
    main.cpp 
    pixel2cam.cpp 
    find_feature_matches.cpp
    gauss_newton.cpp
    g2o_pnp.cpp
)

add_executable (run_pnp ${PNP_SRC})
target_link_libraries(run_pnp 
    ${OpenCV_LIBS} 
    ${G2O_CORE_LIBRARY}
    ${G2O_STUFF_LIBRARY}
    Eigen3::Eigen 
    Sophus::Sophus
)
